create database mizhi;
use mizhi;
create table user(
uid int primary key auto_increment,
uname varchar(10) NOT NULL,
email varchar(25) unique,
password varchar(60),
regtime int(10) unsigned default "0",
lastlogin int(10) unsigned default "0"
) charset utf8;

create table com(
cid int primary key auto_increment,
cname varchar(10) NOT NULL,
email varchar(25) unique,
password varchar(60),
regtime int(10) unsigned default "0",
lastlogin int(10) unsigned default "0",
license varchar(40),
logo varchar(40)
) charset utf8;

create table manage(
mid int primary key auto_increment,
mname varchar(10) NOT NULL,
email varchar(25) unique,
password varchar(60),
lastlogin int(10) unsigned default "0"
) charset utf8;

create table cats(
cat_id int primary key auto_increment,
cat_name varchar(10) NOT NULL,
pid int unsigned
) charset utf8;

create table recruit(
rid int primary key auto_increment,
cid int unsigned,
rname varchar(20) not null,
wages varchar(10),
city varchar(20),
expir varchar(20) default "0",
intro varchar(1000),
contact varchar(10),
phone int(11) not null
) charset utf8;

create table apply(
aid int primary key auto_increment,
uid int unsigned,
aname varchar(20) not null,
wages varchar(10),
city varchar(20),
expir varchar(20) default "0",
intro varchar(1000),
contact varchar(10),
phone int(11) not null
) charset utf8;

create table comm(
comm_id int primary key auto_increment,
rid int unsigned,
impress varchar(15),
content varchar(200) not null,
score enum("0","1","2","3","4","5") default "5",
praise int default "0",
pubtime int unsigned
) charset utf8;

create table resume(
resume_id int primary key auto_increment,
uid int unsigned,
path varchar(40) not null
) charset utf8;